<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box div {
            width: 300px;
            height: 300px;
            background: red;
        }

        .box div:nth-child(1) {
            float: left;
        }

        .box div:nth-child(2) {
            float: right;
        }

        /* 浮动得元素会脱离文档流 */
    </style>
</head>

<body>
    <!-- 浮动 -->
    <div class="box">
        <div>left</div>
        <div>right</div>
    </div>
    1111
</body>

</html>